package com.groupbuying.redpacket.service;

import com.groupbuying.redpacket.domain.RedPacketRuleDO;
import com.groupbuying.redpacket.domain.RedPacketTaskDO;
import com.groupbuying.redpacket.dto.RedPacketTaskDTO;
import com.groupbuying.redpacket.dto.RedPacketTaskVo;
import com.groupbuying.redpacket.utils.apiresult.ApiResult;

import java.util.List;
import java.util.Map;

/**
 * 红包任务表
 * 
 * @author vincnetxin
 * @email vincentxin@aliyun.com
 * @date 2019-11-12 14:54:23
 * @des
 */

public interface RedPacketTaskService {
	
	RedPacketTaskDO get(Long id);
	
	List<RedPacketTaskDO> list(Map<String, Object> map);
	
	int count(Map<String, Object> map);
	
	int save(RedPacketTaskDO redPacketTask);
	
	int update(RedPacketTaskDO redPacketTask);
	
	int remove(Long id);
	
	int batchRemove(Long[] ids);

	ApiResult addTaskAndRule(RedPacketTaskDO redPacketTask, List<RedPacketRuleDO> redPacketRuleDOS);

	ApiResult updateTaskAndRule(RedPacketTaskDO redPacketTask, List<RedPacketRuleDO> redPacketRuleDOS);

	/**
	 * @MethodName: nowTaskState
	 * @Description: TODO	当前任务状态
	 * @Return: com.groupbuying.redpacket.utils.apiresult.ApiResult
	 * @Author: srlg3
	 * @Date: 2019/11/21
	 */
	ApiResult nowTaskStateService();

	List<RedPacketTaskVo> listTask(Map<String, Object> map);

	int getCount();

	ApiResult getTask(Long id);
}
